<?php
/**
格式化显示错误提示
author: jroam
*/
function formatalt($str)
{
	if($str=="") return "";
	//定义消息数组
	$arr=array(
		"E12041025"=>"商户不支持此信用卡",
		"E12041026"=>"信用卡日交易次数限制",
		"E12041030"=>"商户交易号重复",
		"E12041029"=>"超出日交易限额",
		"E12041036"=>"超出预授权金额浮动范围",
		"E12041042"=>"此卡不允许做此交易",
		"E12041006"=>"信用卡格式错误",
		"E12041008"=>"交易金额格式错误",
		"E12041013"=>"商户号错误",
		"E12041024"=>"MOTO不支持此信用卡",
		"E12041010"=>"持卡人证件格式错误",
		"E12041009 "=>"持卡人姓名格式错误",
		"E12041011"=>"持卡人电话格式错误",
		"E12041023"=>"超出单笔交易限额",
		"E12042000"=>"银行不允许此交易",
		"E12041027"=>"信用卡日交易有效期错误次数限制",
		"E12041033"=>"金额原交易不符",
		"E12042010"=>"无效交易",
		
	);
	
	foreach($arr as $k=>$v)
	{
		$str=str_replace($k,$v,$str);
	}
	return $str;
}

?>